projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
431227e
)
Avoid dereferencing NULL pointer in gtk_label_drag_data_get()
author
Tristan Van Berkom
<tristan.van.berkom@gmail.com>
Fri, 26 Aug 2011 16:58:44 +0000
(18:58 +0200)
committer
Tristan Van Berkom
<tristan.van.berkom@gmail.com>
Fri, 26 Aug 2011 17:02:36 +0000
(19:02 +0200)
It's possible the GtkLabel receives drag'n'drop related signals
if it was setup to receive them by a container or other external
code, just avoid dereferencing priv->select_info in this case.
gtk/gtklabel.c
patch
|
blob
|
history
diff --git
a/gtk/gtklabel.c
b/gtk/gtklabel.c
index 9fadbfd2d2825bd8dba6226b497af42f0b353ca9..0bb962c1ac68151728251182cd2da8bcf59afe9d 100644
(file)
--- a/
gtk/gtklabel.c
+++ b/
gtk/gtklabel.c
@@
-5333,7
+5333,8
@@
gtk_label_set_selection_text (GtkLabel *label,
{
GtkLabelPrivate *priv = label->priv;
- if ((priv->select_info->selection_anchor !=
+ if (priv->select_info &&
+ (priv->select_info->selection_anchor !=
priv->select_info->selection_end) &&
priv->text)
{